/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ygroup.eventsystem.samples.handler;

import com.ygroup.eventsystem.annotation.EventHandle;
import com.ygroup.eventsystem.integration.spring.annotation.EventListenerAware;
import com.ygroup.eventsystem.samples.event.ExtSampleEvent;
import com.ygroup.eventsystem.samples.event.SampleEvent;

/**
 *
 * @author joshua
 */
@EventListenerAware
public class SampleEventHandler
{
    
    @EventHandle
    public void processSampleEvent(SampleEvent event) throws Exception
    {
        System.out.println("process sample event:"+event);
        throw new Exception("exception");
    }
    
//    @EventHandle(async=true)
    public void asyncProcessSampleEvent(SampleEvent event)
    {
        System.out.println("async process sample event:"+event);
    }
//    @EventHandle
    public void processExtSampleEvent(ExtSampleEvent event)
    {
        System.out.println("processExtSampleEvent:"+event);
    }
}
